package com.dingreading.cloud.admin.service.impl;

import com.dingreading.cloud.admin.entity.BookLabel;
import com.dingreading.cloud.admin.entity.table.BookLabelTableDef;
import com.dingreading.cloud.admin.mapper.BookLabelMapper;
import com.dingreading.cloud.admin.service.BookLabelService;
import com.mybatisflex.core.query.QueryWrapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 服务层实现。
 *
 * @author Administrator
 * @since 2023-11-22
 */
@Service
public class BookLabelServiceImpl extends BaseServiceImpl<BookLabelMapper, BookLabel, BookLabelTableDef> implements BookLabelService {

    @Override
    protected BookLabelTableDef getTable() {
        return BookLabelTableDef.bookLabel;
    }

    @Override
    public List<BookLabel> getAllOrderByOrderNumAsc() {
        QueryWrapper wrapper = QueryWrapper.create()
                .orderBy(table.orderNum.asc());
        return getMapper().selectListByQuery(wrapper);
    }

}
